<html>
<head>
<!--
  Copyright 2009 Google Inc.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
  <title>GEarthExtensions Test Runner</title>
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
  <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script>
  <script src="http://www.google.com/jsapi?key=ABQIAAAAsc0UQXoo2BnAJLhtpWCJFBTgHOxFyKCf35LCvsI_n4URElrkIhS9MkSlm_0NZWgrKFkOsnd5rEK0Lg" type="text/javascript"></script>
  <script src="jsUnitCore.js" type="text/javascript"></script>
  <script src="geoTestCore.js" type="text/javascript"></script>
  
  <script src="geo.js" type="text/javascript"></script>
  <script src="extensions.js" type="text/javascript"></script>
  <script src="extensions.tests.js" type="text/javascript"></script>
  
  <script src="extensions-test-helpers.js" type="text/javascript"></script>
  
  <link href="test-runner.css" rel="stylesheet" type="text/css"/>
  <script src="test-runner.js" type="text/javascript"></script>
<script type="text/javascript">

var testplugin_ = null;
var testext_ = null;

google.load('earth', '1');
google.setOnLoadCallback(function() {
  init();
  enableUI(false);
  google.earth.createInstance('map3d', function(pluginInstance) {
    enableUI(true);
    testplugin_ = pluginInstance;
    testplugin_.getWindow().setVisibility(true);
    testext_ = new GEarthExtensions(testplugin_);
    
  }, function() {});
});

</script>
<style type="text/css">
  #map3d {
    width: 498px;
    height: 498px;
    position: absolute;
    right: 10px;
    top: 10px;
    border: 1px solid #888;
  }
  
  #testprompt {
    padding: 10px;
    width: 478px;
    position: absolute;
    right: 10px;
    top: 520px;
    border: 1px solid #888;
  }
  
  #testprompt-text {
    margin-right: 120px;
  }
  
  #testprompt-text p {
    margin: 0;
    margin-bottom: 10px;
  }
  
  #testprompt-buttons {
    position: absolute;
    width: 100px;
    right: 10px;
    top: 10px;
  }
</style>
</head>
<body style="margin-right: 520px;">
  <div id="map3d"></div>
  <div id="testprompt">
    <div id="testprompt-text"></div>
    <div id="testprompt-buttons"></div>
  </div>
  
  <h1><code>GEarthExtensions</code> Test Runner</h1>
  <div id="run-buttons">
    <input type="checkbox" id="passexceptions"/>
    <label for="passexceptions">Debugging: Pass exceptions to browser?</label>
  </div>
  <table id="test-table">
    <tr>
      <th>#</th>
      <th>Test Name</th>
      <th>Status</th>
      <th>Actions<br>
          <input type="button" onclick="runTests(TESTS_AUTOMATED)" value="Run Automated Tests"/><br>
          <input type="button" onclick="runTests(TESTS_ALL)" value="Run All Tests"/></th>
      <th>Notes</th>
    </tr>
  </table>
</body>
</html>
